import axios from 'axios'
import type { NextPage } from 'next'
import style from './user.module.css';
import Image from 'next/image';
import userIcon from '../../public/TET.png';

interface userProps {
  AuctionName: string,
  Id: Number
}
const User = (props: any) => {
  console.log(props.Data[0].AuctionName)
  return (
    <div className={style.name}>
      <p>{props.Data[0].AuctionName}</p>
      <Image
        alt="Picture of the author"
        src="/TET.png" width={500} height={100}></Image>
      <Image src={userIcon}
        height={200}
        alt="Picture of the author"></Image>
    </div>
  )
}
export async function getStaticProps() {
  const data: any = await axios.post('https://www.fastmock.site/mock/cae846f6d41f469130aa509141d03bca/test/api');
  return {
    props: { ...data.data }
  }
}

export default User